home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Tools - Objects / MacApp / MacApp CD Release / MacApp® 2.0.1 Tutorial / Chapter 05 / UIconEdit.inc1.p < prev    next >
Encoding:
Text File  |  1990-10-25  |  2.4 KB  |  84 lines  |  [TEXT/MPS ]

  1. {Copyright © 1989 by Apple Computer, Inc.  All rights reserved.}
  2.  
  3.  
  4.  
  5.  
  6. {-------------------------------------------------------------------------------------------}
  7. {--------------------------------TIconApplication methods-----------------------------------}
  8. {-------------------------------------------------------------------------------------------}
  9.  
  10. PROCEDURE TIconApplication.IIconApplication(iconFileType: OSType);
  11.  
  12. BEGIN
  13.     IApplication(iconFileType);
  14. END;
  15.  
  16.  
  17.  
  18. {-------------------------------------------------------------------------------------------}
  19.  
  20. FUNCTION  TIconApplication.DoMakeDocument(itsCmdNumber: CmdNumber): TDocument; OVERRIDE;
  21.  
  22. VAR
  23.     anIconDocument:        TIconDocument;
  24.  
  25. BEGIN
  26.     New(anIconDocument);                            { Create a TIconDocument object.        }
  27.     FailNIL(anIconDocument);                        { Make sure we were successful.            }
  28.     anIconDocument.IIconDocument;                    { Initialize it.                        }
  29.  
  30.     DoMakeDocument := anIconDocument;                { Return a reference to the document.    }
  31. END;
  32.     
  33.     
  34.     
  35.     
  36. {-------------------------------------------------------------------------------------------}
  37. {----------------------------------TIconDocument methods------------------------------------}
  38. {-------------------------------------------------------------------------------------------}
  39.  
  40. PROCEDURE TIconDocument.IIconDocument;
  41.  
  42. BEGIN
  43.     IDocument(kFileType,                             { This document's file type.            }
  44.               kSignature,                             { This document's creator.                }
  45.               kUsesDataFork,                         { This document does use the data fork    }
  46.               NOT kUsesRsrcFork,                    { …but doesn't use the resource fork.    }
  47.               NOT kDataOpen,                        { We don't want the data fork kept open    }
  48.               NOT kRsrcOpen);                        { …nor the resource fork.                }
  49.  
  50.     { Here you will initialize the data specific to your document. }
  51. END;
  52.  
  53.  
  54. {-------------------------------------------------------------------------------------------}
  55.  
  56. PROCEDURE TIconDocument.DoInitialState; OVERRIDE;
  57.  
  58. BEGIN
  59.     { Here you will set your document’s data to it’s “new” state. }
  60. END;
  61.  
  62.  
  63. {-------------------------------------------------------------------------------------------}
  64.  
  65. PROCEDURE TIconDocument.Free; OVERRIDE;
  66.     
  67. BEGIN
  68.     { Here you will free any memory allocated in your document’s initialization methods.     }
  69.  
  70.     INHERITED Free;
  71. END;
  72.  
  73.  
  74. {-------------------------------------------------------------------------------------------}
  75.  
  76. PROCEDURE TIconDocument.DoMakeViews(forPrinting: boolean); OVERRIDE;
  77.  
  78. BEGIN
  79.     { Do nothing for now. }
  80. END;
  81.  
  82.  
  83.  
  84.